package com.wyg.action;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.opensymphony.xwork2.ActionSupport;
import com.wyg.pojo.Test;
import com.wyg.service.ManagerService;
import com.wyg.service.impl.ManagerServiceImpl;

public class ManagerAction extends ActionSupport{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String startTime;
	private String endTime;
	
	public String getStartTime() {
		return startTime;
	}
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	private ManagerService msi;
	
	public ManagerService getMsi() {
		return msi;
	}
	public void setMsi(ManagerService msi) {
		this.msi = msi;
	}
	//所有用户
	public String allUser(){
		String result = msi.showAllUser();
		return result;
	}
	//选择题库
	public String showChoiceQuestion(){
		System.out.println("ManagerAction---showChoiceQuestion");
		String result = msi.allChoiceQuestion();
		return result;
	}
	//在线用户
	public String showOnLineUser(){
		String result = msi.showOnLineUser();
		return result;
	}
	//判断
	public String showPanduanQuestion(){
		String result = msi.showPanduanQuestion();
		return result;
	}
	//改题
	public String goChangeQuestion(){
		String result = msi.goChangeQuestion();
		return result;
	}
	//去设置考试时间页面
	public String goSetTestTime(){
		return "goSetTestTime";
	}
	//设置考试时间
	public String setTestTime() throws ParseException{
		Test.startTime = getStartTime();
		Test.endTime = getEndTime();
		return "setOk";
	}
	

}
